'\" t
.\"     Title: function::bytes_to_string
.\"    Author: 
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: April 2024
.\"    Manual: Memory Tapset
.\"    Source: SystemTap Tapset Reference
.\"  Language: English
.\"
.TH "FUNCTION::BYTES_TO_S" "3stap" "April 2024" "SystemTap Tapset Reference" "Memory Tapset"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
function::bytes_to_string \- Human readable string for given bytes
.SH "SYNOPSIS"
.sp
.nf
    bytes_to_string:string(bytes:long)
.fi
.SH "ARGUMENTS"
.PP
\fIbytes\fR
.RS 4
Number of bytes to translate\&.
.RE
.SH "DESCRIPTION"
.PP
Returns a string representing the number of bytes (up to 1024 bytes), the number of kilobytes (when less than 1024K) postfixed by \*(AqK\*(Aq, the number of megabytes (when less than 1024M) postfixed by \*(AqM\*(Aq or the number of gigabytes postfixed by \*(AqG\*(Aq\&. If representing K, M or G, and the number is amount is less than 100, it includes a \*(Aq\&.\*(Aq plus the remainer\&. The returned string will be 5 characters wide (padding with whitespace at the front) unless negative or representing more than 9999G bytes\&.
.SH SEE ALSO\n 
.IR tapset::proc_mem (3stap)
